package org.springframework.prospring.ticket.domain;

import org.springframework.prospring.ticket.domain.location.Region;

import java.util.Set;
import java.util.HashSet;
import java.sql.Time;

import com.thoughtworks.xstream.annotations.XStreamAlias;

/**
 * Created by IntelliJ IDEA.
 * User: Adm
 * Date: 12/07/2006
 * Time: 23:06:47
 * To change this template use File | Settings | File Templates.
 */

//esta Anotario se usa para que el controler guarde en parametro en el response con ese nombre y depues JSON lo puede tomar

@XStreamAlias("Club")
public class Club {
    Long id;
    String name;
    String mail;
    String website;
    String contacts;
    String comments;
    /**
     * hora de incio de actividades
     */
    Time openingTime;
    /**
     * hora de cierre de actividades
     */
    Time closingTime;
    Region region;
    Set fields;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }


    public String getWebsite() {
        return website;
    }

    public void setWebsite(String website) {
        this.website = website;
    }


    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    public Time getOpeningTime() {
        return openingTime;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public void setOpeningTime(Time openingTime) {
        this.openingTime = openingTime;
    }

    public Time getClosingTime() {
        return closingTime;
    }

    public void setClosingTime(Time closingTime) {
        this.closingTime = closingTime;
    }

    public Region getRegion() {
        return region;
    }

    public void setRegion(Region region) {
        this.region = region;
    }

    public Set getFields() {
        return fields;
    }

    public void setFields(Set fields) {
        this.fields = fields;
    }

    public void addField(Field field){
        if (this.fields == null){
            this.fields = new HashSet();
        }
        this.fields.add(field);
    }

    public String toString() {
        String message = "id=" +id+", name="+name+", mail="+mail+"Collection not are availables";
        return message;
    }
}
